/*
 * @Author: your name
 * @Date: 2021-02-25 18:13:29
 * @LastEditTime: 2021-03-02 16:51:10
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \xgwsp_frontendd:\project\tsx\demo-tsx\src\axios\modules\user.ts
 */
import http from '../request/axios';
import { ILogin } from 'type/api.type';

/**
 * @description: 用户登录
 * @param {ILogin} params
 * @return {Promise}
 */
export const UserLogin = (params: ILogin): Promise<any> => {
  return http.apiPost({
    url: '/api/userlogin/login/',
    data: params,
    message: '正在登陆中...',
    loading: true,
  });
};
/**
 * @description: 用户登出
 * @return {Promise}
 */
export const UserLogout = (): Promise<any> => {
  return http.apiPost({
    url: '/api/userlogin/loginout',
  });
};
